package cn.aiszs.javafx_imp.mapper;

import cn.aiszs.javafx_imp.pojo.Oil;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

//在对应的Mapper上继承基本的类 BaseMapper
@Repository
public interface OilMapper extends BaseMapper<Oil> {
    @Select("select * from javafx.oil where province = #{province}")
    Oil findProvince(@Param("province") String province);

    @Select("select * from javafx.oil")
    List<Oil> findAll();
}
